﻿using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using System.Xml.Linq;
using System.Xml;
using System.Collections;

namespace CRUD
{
  public class MyList : ArrayList
    {
      public void create(string path, Person p) 
        {
            Factory.gi(path).Create(p);            
        }
       public void read(string path)
       {
           this.Clear();
           this.AddRange(Factory.gi(path).Read());          
        }
       public void update(string path, Person p)
       {
           Factory.gi(path).Update(p);
           read(path);
       }
       public void delete(string path, int id)
       {
           Factory.gi(path).Delete(id);
           read(path);
       }

    }  

}
